package com.etlmaster.executor.steps.datax;

import com.etlmaster.executor.StepMeta;

/**
 * @author Larry
 * @copyright Larry@etlMaster
 * @since 2017-09-10
 */
public class HiveWriterStepMeta extends StepMeta {
	private String pluginName="hivewriter";
	private String dsName;
	private String dir;
	private String fieldSplit;
	private String prefix_filename;
	private String file_type="TXT";
	private String encoding="UTF-8";
	private String concurrency;
	private String tableName;
	private String isPartTable;
	private String partWhere;
	
	public String getDsName() {
		return variableSubstitution(dsName);
	}

	public void setDsName(String dsName) {
		this.dsName = dsName;
	}

	public String getConcurrency() {
		return variableSubstitution(concurrency);
	}

	public void setConcurrency(String concurrency) {
		this.concurrency = concurrency;
	}

	public String getHiveTableName() {
		return variableSubstitution(tableName);
	}

	public void setHiveTableName(String tableName) {
		this.tableName = tableName;
	}

	public String getIsPartTable() {
		return variableSubstitution(isPartTable);
	}

	public void setIsPartTable(String isPartTable) {
		this.isPartTable = isPartTable;
	}

	public String getPartWhere() {
		return variableSubstitution(partWhere);
	}

	public void setPartWhere(String partWhere) {
		this.partWhere = partWhere;
	}


	


	public HiveWriterStepMeta(String id, String name,String step_code, String session_id, String paramStr) {
		super(id, name,step_code, session_id, paramStr);
	}

	@Override
	protected void loadParamsFromConfigTable() {
		// TODO Auto-generated method stub

	}

	public String getPluginName() {
		return pluginName;
	}

	public void setPluginName(String pluginName) {
		this.pluginName = pluginName;
	}

	public String getDir() {
		return variableSubstitution(dir);
	}

	public void setDir(String dir) {
		this.dir = dir;
	}

	public String getFieldSplit() {
		String field_Split;
		if(fieldSplit.toLowerCase().equals("tab"))
			field_Split="\t";
		else if(fieldSplit.toLowerCase().equals("comma"))
			field_Split=",";
		else 
			field_Split=null;
		return field_Split;
	}

	public void setFieldSplit(String fieldSplit) {
		this.fieldSplit = fieldSplit;
	}

	public String getPrefix_filename() {
		return prefix_filename;
	}

	public void setPrefix_filename(String prefix_filename) {
		this.prefix_filename = prefix_filename;
	}

	public String getFile_type() {
		return file_type;
	}

	public void setFile_type(String file_type) {
		this.file_type = file_type;
	}

	public String getEncoding() {
		return variableSubstitution(encoding);
	}

	public void setEncoding(String encoding) {
		this.encoding = encoding;
	}



}
